<include file="Public:html" />
 
<link type="text/css" rel="stylesheet" media="screen" href="../Public/css/register.css" /> 
<script type="text/javascript"> 
$(document).ready(function(){
 
	$.formValidator.initConfig({
		formid:"addMemberform",
		validatorgroup:"addMemberform",
		autotip:false
	});
 
	$("#userEmail").formValidator({
		validatorgroup:"addMemberform",
		onshow:"..",
		onfocus:"请输入正确的邮箱",
		oncorrect:".."
	}).inputValidator({
		min:6,
		max:100,
		onerror:"邮箱的长度不对"
	}).regexValidator({
		regexp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",
		onerror:"请输入正确的邮箱"
	}).ajaxValidator({
	    type : "GET",
	    datatype : "json",
		url : APP+"/User/peraddcheck/",
		success : function(data){
            if(data==1){
				hideresendbtn();
				return true;
			}else if(data==2){
				showresendbtn();
				return true;
			}else{
				hideresendbtn();
				return false;
			}
		},
		error: function(){alert("可能服务器忙，请重试");},
		onerror : "该用户名不可用，请更换..",
		onwait : "进行合法性校验，请稍候..."
	});
 
 
	$("#addMembercode").formValidator({
		validatorgroup:"addMemberform",
		onshow:"..",
		onfocus:"请输入验证码",
		oncorrect:".."
	}).inputValidator({
		min:4,
		max:4,
		onerror:"验证码格式不对"
	});
	
	marginLeftOffset("#tips");
 
});
</script> 
</head> 
 
 
 
 
 
<body> 
 
 
<!-- #paiban page --> 
<div id="paiban" class="homepage skin"> 
 
 
	<!-- #header --> 
	<include file="Public:header" />
	<!-- #header end --> 
	
	
	<!-- #register --> 
	<div id="register" class="mainbody clearfix regWrap"> 
	
		<!-- ad 960x100 --> 
        <include file="Public:subpageBanner" />
		<!-- ad 960x100 end --> 
 
		<div id="tips" style="position:absolute; left:50%; width:300px;"></div> 
	
		<div id="signInNow" class="container"> 
	
			<div class="tabview"> 
				<ul class="tab"> 
					<li class="on"><a href="#login">登 录</a></li> 
					<li><a href="#lostPassword">忘记密码</a></li> 
				</ul> 
			</div> 
	
			<div id="login" class="content" style="display:block;"> 
			<script type="text/javascript"> 
$(document).ready(function(){
	var mb_name=getCookie('mb_name');//保留的cookie值,退出时不清空
	$.formValidator.initConfig({
		validatorgroup:"loginform",
		formid:"loginform",
		autotip:true
	});
	
/*
	$("#userPW").formValidator({
		validatorgroup:"loginform",
		onshow:"...",
		onfocus:"密码不能为空",
		oncorrect:"正确"
	}).inputValidator({
		min:1,
		empty:{leftempty:false,rightempty:false,emptyerror:"密码两边不能有空符号"},
		onerror:"密码不能为空,请确认"
	});
*/
	
	$("#userID").formValidator({
		validatorgroup:"loginform",
		onshow:"...",
		onfocus:"继续...",
		oncorrect:"正确",
		defaultvalue:mb_name
	}).inputValidator({
		min:6,
		max:100,
		onerror:"邮箱的长度不对"
	}).regexValidator({
		regexp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",
		onerror:"请输入正确的邮箱"
	});
 
});
</script> 
 
<form id="loginform" autocomplete="off"> 
<p class="inputWrap"> 
	<label for="userID">邮箱:</label> 
	<input id="userID" name="username" type="text" class="input" style="width:220px;" /> 
	<span id="userIDTip"></span> 
</p> 
 
<p class="inputWrap"> 
	<label for="userPW">密码:</label> 
	<input id="userPW" name="password" type="password" class="input" style="width:220px;" /> 
	<span id="userPWTip"></span> 
</p> 
 
<p class="inputWrap clearfix displayNone" id="verifycodeInput"></p> 
<input type="hidden" name='loginmark' id='loginmark' value='L'> 
<p class="inputWrap"> 
	<span class="button button-hilite"> 
		<span class="first-child"> 
			<button type="button" class="f14 strong" onclick="return ajaxlogin();">登 录</button> 
		</span> 
	</span> 
</p> 
 
<p>{$Think.config.sysconfig.webname}用户服务协议：<a href="{:U('/Article/index/id/4')}" title="使用条款">《使用条款》</a></p> 
<p>切勿使用第三方软件自动登录{$Think.config.sysconfig.webname}。</p> 
</form> 
 
<p id="regMsg"></p> 
 
			</div> 
	
			<div id="lostPassword" class="content"> 
			<script type="text/javascript"> 
$(document).ready(function(){
 
	$.formValidator.initConfig({
		formid:"getpwdform",
		validatorgroup:"getpwdform",
		autotip:true
	});
 
	$("#mailbox").formValidator({
		validatorgroup:"getpwdform",
		onshow:"...",
		onfocus:"...",
		oncorrect:" "
	}).inputValidator({
		min:6,
		max:100,
		onerror:"邮箱的长度不对"
	}).regexValidator({
		regexp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",
		onerror:"请输入正确的邮箱"
	});
 
	$("#userverifycode").formValidator({
		validatorgroup:"getpwdform",
		onshow:"...",
		onfocus:"请输入验证码",
		oncorrect:" "
	}).inputValidator({
		min:4,
		max:4,
		onerror:"验证码格式不对"
	});
	
	$("#getpwdform").keydown(function(event){
		if(event.keyCode == 13)
		{
			ajaxgetpwd();
		}
	});
 
});
</script> 
 
<form id='getpwdform' autocomplete="off"> 
	<div class="inputWrap"> 
		<label>邮箱:</label> 
		<input type="text" id="mailbox" name="mailbox" class="input" style="width:220px;" onFocus="fleshVerify('verifyImg_forget');" /> 
		<span id='mailboxTip'></span> 
	</div> 
	<div class="inputWrap clearfix" id="verifycodeInput"> 
		<label for="userverifycode">验证码:</label> 
		<input type="text" class="input fl space" name="forgetcode"  id="userverifycode" style="width:60px;"/> 
		<span class="fl space"><img id="verifyImg_forget" src="__APP__/User/verify/" onClick="fleshVerify('verifyImg_forget')" title="点击刷新验证码" style="width: 68px; height: 30px;"/></span> 
		<span id="userverifycodeTip"></span> 
	</div> 
 
	<div class="inputWrap"> 
		<span class="button button-hilite"> 
			<span class="first-child"> 
				<button type="button" onclick="return ajaxgetpwd()"><strong>发 送</strong></button> 
			</span> 
		</span> 
	</div> 
	
	<p class="notice">系统将自动发送一封重置邮件到您邮箱，请注意查收，逾期失效。</p> 
	<p class="notice">建议设置高强度的密码串，注意妥善保管。</p> 
 
</form> 
			</div> 
		</div> 
 
		<div id="signUpNow" class="container"> 
 
			<div class="tabview"> 
				<h2 class="title fl">创建一个新账户</h2> 
			</div> 
			
			<div class="content" style=" display:block;"> 	
				<form id="addMemberform" autocomplete="off"> 
				<div class="inputWrap"> 
					<label for="userEmail">邮箱:</label> 
					<input id="userEmail" type="text" class="input" style="width:220px;" onFocus="fleshVerify('verifyImg_reg');" /> 
					<span id="userEmailTip"></span> 
				</div> 
		
				<div class="inputWrap clearfix" id="verifycodeInput"> 
					<label for="addMembercode">验证码:</label> 
					<input type="text" class="input fl space" id="addMembercode" style="width:60px;" /> 
					<span class="fl space"><img id="verifyImg_reg" src="__APP__/User/verify/" onClick="fleshVerify('verifyImg_reg')" title="点击刷新验证码" style="width: 68px; height: 30px;"/></span> 
					<span id="addMembercodeTip"></span> 
				</div> 
		
				<div class="inputWrap cb"> 
					<span class="button button-hilite" id='sendbtn'> 
						<span class="first-child" > 
							<button type="button" onClick="return addMember()" class="strong">开始发送验证邮件</button> 
						</span> 
					</span> 
					<span class="button button-hilite" id='resendbtn' style="display:none;"> 
						<span class="first-child" > 
							 <button type="button" onClick="return resendmail()" class="strong">重新发送验证邮件</button> 
						</span> 
					</span> 
				</div> 
				</form> 
				<p class="notice">系统将自动发送一封验证邮件到您邮箱，请注意查收。</p> 
				<p class="notice">如果您已拥有{$Think.config.sysconfig.webname}账户，请勿再注册。<a href="{:U('/Article/index/id/16')}" title="查看违规处理">[详情]</a></p> 
 
			</div> 
		</div> 
	
	
	</div> 
	<!-- #register end --> 
	
	
	
	<!-- #footer --> 
	<include file="Public:footer" />
	<!-- #footer end --> 
 
 
</div> 
<!-- #paiban page end --> 
 
</body> 
</html>